-- GENERATED SPELL FOR [Lady Alistra] --


function spell0_28471(pUnit, Event) --@Anti-Magic Shell,Self--
pUnit:FullCastSpellOnTarget(53766,pUnit)
pUnit:RegisterEvent('Sorts_28471', 609, 1)
end

function spell1_28471(pUnit, Event) --@Corpse Explosion,n/a--
pUnit:FullCastSpellOnTarget(53717,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28471', 3000, 1)
end

function spell2_28471(pUnit, Event) --@Death and Decay,n/a--
pUnit:FullCastSpellOnTarget(53721,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28471', 10000, 1)
end

function spell3_28471(pUnit, Event) --@Death Coil,n/a--
pUnit:FullCastSpellOnTarget(53769,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28471', 553, 1)
end

function spell4_28471(pUnit, Event) --@Degeneration,n/a--
pUnit:FullCastSpellOnTarget(53605,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28471', 21000, 1)
end

function spell5_28471(pUnit, Event) --@Open Shadow Portal,Self--
pUnit:FullCastSpellOnTarget(53765,pUnit)
pUnit:RegisterEvent('Sorts_28471', 3000, 1)
end

function spell6_28471(pUnit, Event) --@Plague Strike,n/a--
pUnit:FullCastSpellOnTarget(53694,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28471', 20000, 1)
end

function Sorts_28471(pUnit, Event)
local choix_sorts_28471 = math.random(0, 6)
if choix_sorts_28471 == 0 then
pUnit:RegisterEvent('spell0_28471', 1, 1)
end
if choix_sorts_28471 == 1 then
pUnit:RegisterEvent('spell1_28471', 1, 1)
end
if choix_sorts_28471 == 2 then
pUnit:RegisterEvent('spell2_28471', 1, 1)
end
if choix_sorts_28471 == 3 then
pUnit:RegisterEvent('spell3_28471', 1, 1)
end
if choix_sorts_28471 == 4 then
pUnit:RegisterEvent('spell4_28471', 1, 1)
end
if choix_sorts_28471 == 5 then
pUnit:RegisterEvent('spell5_28471', 1, 1)
end
if choix_sorts_28471 == 6 then
pUnit:RegisterEvent('spell6_28471', 1, 1)
end
end

function mob28471_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28471', math.random(1500, 3000), 1)
end

function mob28471_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28471_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28471_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28471, 1, 'mob28471_Action')
RegisterUnitEvent(28471, 2, 'mob28471_Leave')
RegisterUnitEvent(28471, 3, 'mob28471_Kill')
RegisterUnitEvent(28471, 4, 'mob28471_Die')
